2025-02-17
The app aims to support learning how the decision tree classification algorithm works.
In the app the user can train a decision tree classifier with different hyperparameters.
The user sees a visual representation of the fitted decision tree.
The decision tree can be used to make predictions.
The underlying dataset is called ‘Palmer Archipelago (Antarctica) Penguin Data’. It contains features from different penguins observed in the Palmer Archipelago near Palmer Station, Antarctica.
After the users selected the algorithm’s hyperparameter and clicked on “Train decision tree” the algorithms tries to find the best decision tree to predict a penguin’s species.
Once the training is complete a visual decision tree appears:
The trained model can then be used to predict the species of a new penguin.
newdata <- data.frame(
island = "Biscoe",
bill_length_mm = 43,
bill_depth_mm = 17,
flipper_length_mm = 200,
body_mass_g = 4201,
sex = "female",
year = "2007")
predict(model, newdata = newdata) Adelie Chinstrap Gentoo
1 0 1 0